package com.ljx.itbbs.common.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@TableName("tb_user")
public class UserEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("用户ID")
    private Long id;

    @ApiModelProperty("账号")
    @TableField("username")
    private String username;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("昵称")
    @TableField("nickname")
    private String nickname;

    @ApiModelProperty("头像")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty("个人介绍")
    @TableField("introduce")
    private String introduce;

    @ApiModelProperty("等级")
    @TableField("grade")
    private Integer grade;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("积分")
    @TableField("integral")
    private Integer integral;

    @ApiModelProperty("IP信息")
    @TableField("ip_info")
    private String ipInfo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("最近一次登录时间")
    @TableField("last_opt_time")
    private Date lastOptTime;

    @ApiModelProperty("在线状态（1：在线，2：离线）")
    @TableField("active_status")
    private Integer activeStatus;

    @ApiModelProperty("经验")
    @TableField("exp")
    private Long exp;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty("修改时间")
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty("状态（1：正常，2：禁用）")
    @TableField("status")
    private Integer status;

}
